Implement a time scheduler with precise light settings #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Thank you for creating such a great project!
I’m looking to enhance the application with the ability to manually set temperature and brightness within specific time intervals. For instance, in the morning, I want to utilize full brightness even though it might still be dark outside, and the same applies during working hours.
I’ve introduced a new device type: “Circadian Timing Zone”.
This addition provides three options to the original “Circadian Zone”:
Fade Duration
Timing JSON
Timing JSON for Night Mode (this is probably over engineering and needs to be removed)
Within the JSON, adjustments can be made for the given intervals.
Here’s a JSON configuration example (this is just for example purpose):
In this configuration, from 01:00, the device will utilize 5% brightness (0.05), maintaining the circadian temperature. From 06:00, it will operate at maximum brightness and the coolest temperature. Starting from 21:00, the device will use circadian temperature with 73% brightness, and from 22:00, it will fully revert to the original circadian options.
If the JSON fields are left empty, the device will operate as initially implemented, with only circadian lighting.
The “Fade Duration” option is introduced to prevent abrupt transitions or blinking when it’s time to switch. The light will gradually adjust during this duration. For instance, if “Fade Duration” is set to 60 (minutes), the light will begin to increase in brightness from 0.05 to 1 starting at 05:00, reaching full brightness at 06:00 (±3 minutes).
What do you think?
In my opinion, there is no need for a separate device, as the modification will not affect the original Circadian Zone device, provided the JSON is empty.
If you consider such a refinement mergeable, I will need to enhance the code quality in both scenarios:
Originally, my code aimed to minimize alterations to your existing code, anticipating a scenario where the changes may not be accepted into the mainstream. This would allow me to maintain my fork in the event of any updates to your repository.